//生产业绩
angular.module('SmartCanteenApp.newReport', ['ngRoute', 'ngTouch'])

    .config(['$routeProvider', function ($routeProvider) {
        $routeProvider.when('/userCountReport', {
            templateUrl: 'financial/dayReport.html',
            controller: 'newReportCtrl'
        });
    }])

    .controller('newReportCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
    	console.log('welcome to newReport')
    	$('#datepicker').datepicker({
			autoclose: true
		});
		//获取当前报表id
		var id  = window.sessionStorage.getItem('reportId')
		console.log(id)
		$scope.searchReportBy = {
			"query_terms":"按档口",
			"time":$scope.getNowFormatDate()
		}
		$scope.searchReport = function(){
			let sql = "sql = query_terms='"+$scope.searchReportBy.query_terms+"' and time="+$scope.searchReportBy.time
			console.log(sql)
		}
    }])
